/*
 * Copyright 2022-2023 the original author(https://github.com/wj596)
 * 
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * </p>
 */
package org.jsets.fastboot.security.authc;

import java.io.Serializable;

/**
 * 认证请求接口
 *
 * @author wangjie (https://github.com/wj596)
 * @date 2021.07.06 22:26
 * @since 0.1
 */
public class AuthcRequest implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private String username;// 用户名
	private String password;
	private String captchaKey;
	private String captcha;
	private boolean captchaEnable;
	private String userHost;// 登陆地址
	private String userAgent;// 浏览器
	private String source;// 来源，如:PC、APP、微信等
	private boolean rememberMe;// 记住我
	private String rememberMeIdentity;// 记住我凭证
	private String authType;// 认证类型
	private Long tokenExpiration ;// 有效期
	private boolean refreshTokenEnabled;// 是否启用刷新令牌
	
	public void setCaptchaKey(String captchaKey) {
		this.captchaKey = captchaKey;
		this.captchaEnable = true;
	}
	
	public void setCaptcha(String captcha) {
		this.captcha = captcha;
		this.captchaEnable = true;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public boolean isCaptchaEnable() {
		return captchaEnable;
	}

	public String getUserHost() {
		return userHost;
	}

	public void setUserHost(String userHost) {
		this.userHost = userHost;
	}

	public String getUserAgent() {
		return userAgent;
	}

	public void setUserAgent(String userAgent) {
		this.userAgent = userAgent;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public boolean isRememberMe() {
		return rememberMe;
	}

	public void setRememberMe(boolean rememberMe) {
		this.rememberMe = rememberMe;
	}

	public String getRememberMeIdentity() {
		return rememberMeIdentity;
	}

	public void setRememberMeIdentity(String rememberMeIdentity) {
		this.rememberMeIdentity = rememberMeIdentity;
	}

	public String getAuthType() {
		return authType;
	}

	public void setAuthType(String authType) {
		this.authType = authType;
	}

	public Long getTokenExpiration() {
		return tokenExpiration;
	}

	public void setTokenExpiration(Long tokenExpiration) {
		this.tokenExpiration = tokenExpiration;
	}

	public boolean isRefreshTokenEnabled() {
		return refreshTokenEnabled;
	}

	public void setRefreshTokenEnabled(boolean refreshTokenEnabled) {
		this.refreshTokenEnabled = refreshTokenEnabled;
	}

	public String getCaptchaKey() {
		return captchaKey;
	}

	public String getCaptcha() {
		return captcha;
	}
}